home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / setup_ut / regdata / regdata.txt < prev   
Text File  |  1995-08-20  |  2KB  |  35 lines

  1. REGDATA.BAS  A Visual Basic(tm) Version 3 registration Module
  2. =============================================================
  3. This is a module I wrote for an application that is likely
  4. to be used on both Windows 3.x and Windows 95 operating systems.
  5.  
  6. I wanted the Uninstall feature of Win95 to list my uninstaller,
  7. without resorting to 'thunking' a 16-bit call to the 32-bit
  8. registration functions.
  9.  
  10. The problem is that the 16-bit registration API does not allow
  11. the multiple keys that are required for the Uninstall entry.
  12.  
  13. With a bit of experimentation, I found that if a REGEDIT4 file
  14. was merged using the correct entries, that it could be done, so
  15. a temporary .REG file is created 'on-the-fly' in the uninstall
  16. registration routine, and merged invisibly using regedit /s.
  17.  
  18. ============================================================
  19.  
  20. The resultant BAS file contains 2 main functions:
  21. DoRegistration registers your app;
  22. DoUnregistration unregisters it.
  23. Both functions will detect the windows version, and act accordingly.
  24. Tested under build 490 (June release 2)
  25.  
  26. You will need to set the FLAG variables to those appropriate to
  27. your particular needs, and setup the parameters (lots of them!)
  28. for the calls, but I've tried to make it as generic as possible,
  29. so that you can 'plug in' REGDATA with only a small amount of effort.
  30.  
  31. The code is supplied 'as is' and you could most likely improve/modify
  32. it for your own needs. It works for me!
  33.  
  34. Gordon Bamber. August 1995
  35. < gbamber@mistral.co.uk >